import { Controller, Get, Query } from '@nestjs/common';
import { Wechat } from 'wechat-jssdk';

const wechat = new Wechat({
  appId: 'wx2eba69e82d09f2b0',
  appSecret: 'a64e2b2a45989dea67d9826070256aee',
});

@Controller('wechat')
export class WechatController {
  @Get('config')
  async getConfig(@Query('url') url: string) {
    return await wechat.jssdk.getSignature(url);
  }
}
